From: Ian Jackson Date: Fri, 14 Jun 2013 15:39:35 +0000 (+0100) Subject: libelf: move include of to top of file X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6736 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f7aa72ec00aec71eed055dac5e8a151966d75c9c;p=xen.git libelf: move include of to top of file libelf-loader.c #includes , when being compiled for Xen. Currently it does this in the middle of the file. Move this #include to the top of the file, before libelf-private.h. This is necessary because in forthcoming patches we will introduce private #defines of memcpy etc. which would interfere with definitions in headers #included from guest_access.h. No semantic or functional change in this patch. This is part of the fix to a security issue, XSA-55. Signed-off-by: Ian Jackson Acked-by: Ian Campbell Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Andrew Cooper Reviewed-by: Chuck Anderson --- diff --git a/xen/common/libelf/libelf-loader.c b/xen/common/libelf/libelf-loader.c index bce667ffc7..94257f672e 100644 --- a/xen/common/libelf/libelf-loader.c +++ b/xen/common/libelf/libelf-loader.c @@ -16,6 +16,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifdef __XEN__ +#include +#endif + #include "libelf-private.h" /* ------------------------------------------------------------------------ */ @@ -116,7 +120,6 @@ static int elf_load_image(struct elf_binary *elf, return 0; } #else -#include void elf_set_verbose(struct elf_binary *elf) {